﻿using Apps.Common;
using Apps.Models;
using Apps.Models.PUB;
using Apps.Models.V;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Apps.IBLL.LMS
{
    public partial interface ILMS_TESTDATA_CONFIRMEDBLL
    {
        List<V_LMS_QUERY_RCModel> GetList(ref GridPager pager, string batch, string sample, string lms, string startdate, string enddate, string TYPE_STR = "");
        List<V_LMS_QUERY_RLModel> GetList2(ref GridPager pager, string batch, string startdate, string enddate);
        List<V_LMS_TESTDATA_CONFIRMEDModel> GetListDetail(ref GridPager pager, string testCode, string code="");
        List<V_LMS_TESTDATA_CONFIRMEDModel> GetConfirmList(ref GridPager pager, string testCode);
        List<V_LMS_TESTDATA_RESULTModel> GetTestDataConfirmedDetail(ref GridPager pager, string testCode);
        List<V_LMS_RESULT> GetV_LMS_RESULT(ref GridPager pager, string TestCode, string queryState);

        ///// <summary>
        ///// 创建化检批次
        ///// 创建化检批次
        ///// </summary>
        ///// <param name="batch">批次号</param>
        ///// <param name="PSCODE">试样号</param>
        ///// <param name="FDATE">收样日期</param>
        ///// <param name="FSUSER">送样人</param>
        ///// <param name="FUSER">收样人</param>
        ///// <param name="errmsg">返回化验码</param>
        ///// <returns></returns>
        //void CreateTestBatch(ref GridPager pager, string batch, string PSCODE, string FDATE, string FSUSER, string FUSER, out string errmsg);
        /// <summary>
        /// 获取化检批次
        /// </summary>
        /// <param name="pager"></param>
        /// <param name="indate"></param>
        /// <param name="material"></param>
        /// <param name="supplier"></param>
        /// <param name="transport"></param>
        /// <returns></returns>
        List<V_LMS_TESTDATA_BATCHModel> GetTestBatch(ref GridPager pager, string batchcode,string indate, string material, string supplier,string transport);
        /// <summary>
        /// 获取可添加化检的批次信息
        /// </summary>
        /// <param name="pager"></param>
        /// <param name="indate"></param>
        /// <param name="material"></param>
        /// <param name="mine"></param>
        /// <param name="supplier"></param>
        /// <param name="transport"></param>
        /// <returns></returns>
        List<V_LMS_TESTDATA_ADDBATCHModel> GetBatchCanCreate(ref GridPager pager, string indate, string material, string mine, string supplier, string transport);
        /// <summary>
        /// 保存化检结果
        /// </summary>
        /// <param name="errors"></param>
        /// <param name="model"></param>
        /// <param name="userid"></param>
        /// <returns></returns>
        bool Confirmed(ref ValidationErrors errors, List<LMS_TESTDATA_CONFIRMEDModel> model, string testcode, string userid);
        /// <summary>
        /// 删除化检结果
        /// </summary>
        /// <param name="errors"></param>
        /// <param name="testcode">化验编码或者批次编码（第三方化验时填批次编码）</param>
        /// <returns></returns>
        bool DeleteTestData(ref ValidationErrors errors, string testcode);
    }
}
